<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>项目模板库 | YOLO Vision AI Platform</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- Tailwind配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CFC9',
                        success: '#52C41A',
                        warning: '#FAAD14',
                        danger: '#FF4D4F',
                        dark: '#1D2129',
                        'dark-2': '#4E5969',
                        'light-1': '#F2F3F5',
                        'light-2': '#E5E6EB',
                        'light-3': '#C9CDD4'
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    boxShadow: {
                        'card': '0 2px 8px rgba(0, 0, 0, 0.08)',
                        'dropdown': '0 4px 16px rgba(0, 0, 0, 0.12)',
                        'hover': '0 4px 12px rgba(22, 93, 255, 0.15)',
                    }
                },
            }
        }
    </script>
    
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-gradient {
                background-clip: text;
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
            }
            .transition-all-300 {
                transition: all 300ms ease-in-out;
            }
            .template-card-hover {
                @apply hover:shadow-hover hover:-translate-y-1 transition-all-300;
            }
        }
    </style>
</head>
<body class="font-inter bg-gray-50 text-dark overflow-hidden h-screen flex flex-col">
    <div class="flex flex-1 overflow-hidden">
        <!-- 主内容区域 -->
        <main class="flex-1 overflow-y-auto bg-gray-50 p-6">
            <!-- 面包屑导航 -->
            <nav class="flex mb-6 text-sm" aria-label="Breadcrumb">
                <ol class="inline-flex items-center space-x-1 md:space-x-3">
                    <li class="inline-flex items-center">
                        <a href="home.html" class="inline-flex items-center text-dark-2 hover:text-primary">
                            <i class="fa fa-home mr-2"></i>
                            首页
                        </a>
                    </li>
                    <li aria-current="page">
                        <div class="flex items-center">
                            <i class="fa fa-angle-right text-dark-2 mx-2"></i>
                            <span class="text-dark font-medium">项目模板库</span>
                        </div>
                    </li>
                </ol>
            </nav>
            
            <!-- 页面标题和操作区 -->
            <div class="mb-6 flex flex-col md:flex-row md:items-center md:justify-between gap-4">
                <div>
                    <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">项目模板库</h2>
                    <p class="text-dark-2 mt-1">从预设模板快速创建新项目，提高开发效率</p>
                </div>
                
                <div class="flex flex-wrap gap-3">
                    <button class="bg-white text-primary border border-primary px-4 py-2 rounded-lg hover:bg-primary/5 transition-all-300 font-medium flex items-center team-admin sys-admin">
                        <i class="fa fa-plus mr-2"></i> 创建新模板
                    </button>
                    <div class="relative">
                        <input type="text" placeholder="搜索模板..." class="pl-10 pr-4 py-2 border border-light-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary w-full md:w-64">
                        <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-dark-2"></i>
                    </div>
                </div>
            </div>
            
            <!-- 模板分类筛选 -->
            <div class="bg-white rounded-xl shadow-card p-6 mb-6">
                <div class="flex flex-wrap items-center gap-3">
                    <span class="text-dark text-sm font-medium whitespace-nowrap">模板分类：</span>
                    <button class="px-4 py-1.5 bg-primary text-white rounded-full text-sm transition-all-300">
                        全部模板
                    </button>
                    <button class="px-4 py-1.5 bg-white text-dark-2 border border-light-2 rounded-full text-sm hover:bg-light-1 transition-all-300">
                        目标检测
                    </button>
                    <button class="px-4 py-1.5 bg-white text-dark-2 border border-light-2 rounded-full text-sm hover:bg-light-1 transition-all-300">
                        图像分类
                    </button>
                    <button class="px-4 py-1.5 bg-white text-dark-2 border border-light-2 rounded-full text-sm hover:bg-light-1 transition-all-300">
                        语义分割
                    </button>
                    <button class="px-4 py-1.5 bg-white text-dark-2 border border-light-2 rounded-full text-sm hover:bg-light-1 transition-all-300">
                        实例分割
                    </button>
                    <button class="px-4 py-1.5 bg-white text-dark-2 border border-light-2 rounded-full text-sm hover:bg-light-1 transition-all-300">
                        自定义
                    </button>
                </div>
            </div>
            
            <!-- 推荐模板 -->
            <div class="mb-8">
                <div class="flex items-center justify-between mb-4">
                    <h3 class="font-bold text-lg">推荐模板</h3>
                    <a href="#" class="text-primary text-sm hover:underline flex items-center">
                        查看全部 <i class="fa fa-angle-right ml-1"></i>
                    </a>
                </div>
                
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                    <!-- 推荐模板1 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-40 bg-gradient-to-r from-primary to-secondary relative">
                            <img src="https://picsum.photos/id/180/800/400" alt="智能安防检测模板" class="w-full h-full object-cover mix-blend-overlay opacity-70">
                            <div class="absolute top-3 left-3 px-2 py-1 bg-primary text-white text-xs rounded">
                                热门推荐
                            </div>
                        </div>
                        <div class="p-5">
                            <div class="flex items-start justify-between">
                                <h4 class="font-bold text-lg mb-2">智能安防检测</h4>
                                <div class="flex space-x-1">
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star-half-o text-warning"></i>
                                </div>
                            </div>
                            <p class="text-dark-2 text-sm mb-4 line-clamp-2">基于YOLOv8模型的智能安防检测系统，适用于监控场景中的行人、车辆、异常行为识别等。</p>
                            <div class="flex items-center justify-between">
                                <div class="flex items-center space-x-3">
                                    <span class="text-xs px-2 py-1 bg-primary/10 text-primary rounded-full">目标检测</span>
                                    <span class="text-dark-2 text-xs">
                                        <i class="fa fa-download mr-1"></i> 2458次使用
                                    </span>
                                </div>
                                <button class="bg-primary text-white px-3 py-1.5 rounded-lg text-sm hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1"></i> 使用模板
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 推荐模板2 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-40 bg-gradient-to-r from-secondary to-success relative">
                            <img src="https://picsum.photos/id/119/800/400" alt="车辆识别系统模板" class="w-full h-full object-cover mix-blend-overlay opacity-70">
                            <div class="absolute top-3 left-3 px-2 py-1 bg-success text-white text-xs rounded">
                                最新模板
                            </div>
                        </div>
                        <div class="p-5">
                            <div class="flex items-start justify-between">
                                <h4 class="font-bold text-lg mb-2">车辆识别系统</h4>
                                <div class="flex space-x-1">
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star-o text-warning"></i>
                                </div>
                            </div>
                            <p class="text-dark-2 text-sm mb-4 line-clamp-2">高精度车辆检测与识别系统，支持车型、颜色、车牌等多维度识别，适用于智能交通场景。</p>
                            <div class="flex items-center justify-between">
                                <div class="flex items-center space-x-3">
                                    <span class="text-xs px-2 py-1 bg-primary/10 text-primary rounded-full">目标检测</span>
                                    <span class="text-dark-2 text-xs">
                                        <i class="fa fa-download mr-1"></i> 1285次使用
                                    </span>
                                </div>
                                <button class="bg-primary text-white px-3 py-1.5 rounded-lg text-sm hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1"></i> 使用模板
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 推荐模板3 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-40 bg-gradient-to-r from-warning to-danger relative">
                            <img src="https://picsum.photos/id/433/800/400" alt="缺陷检测模板" class="w-full h-full object-cover mix-blend-overlay opacity-70">
                        </div>
                        <div class="p-5">
                            <div class="flex items-start justify-between">
                                <h4 class="font-bold text-lg mb-2">工业缺陷检测</h4>
                                <div class="flex space-x-1">
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                    <i class="fa fa-star text-warning"></i>
                                </div>
                            </div>
                            <p class="text-dark-2 text-sm mb-4 line-clamp-2">高精度工业产品缺陷检测系统，支持微小缺陷识别、分类和定位，适用于制造业质量控制。</p>
                            <div class="flex items-center justify-between">
                                <div class="flex items-center space-x-3">
                                    <span class="text-xs px-2 py-1 bg-secondary/10 text-secondary rounded-full">实例分割</span>
                                    <span class="text-dark-2 text-xs">
                                        <i class="fa fa-download mr-1"></i> 956次使用
                                    </span>
                                </div>
                                <button class="bg-primary text-white px-3 py-1.5 rounded-lg text-sm hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1"></i> 使用模板
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 全部模板 -->
            <div>
                <h3 class="font-bold text-lg mb-4">全部模板</h3>
                
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
                    <!-- 模板1 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-primary to-primary/70">
                            <img src="https://picsum.photos/id/237/600/300" alt="人脸识别模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">人脸识别</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">高精度人脸识别系统，支持人脸检测、特征提取和比对。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-primary/10 text-primary rounded-full">目标检测</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板2 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-secondary to-secondary/70">
                            <img src="https://picsum.photos/id/493/600/300" alt="动物识别模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">动物识别</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">野生动物种类识别系统，支持多种常见动物的快速识别。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">图像分类</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板3 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-success to-success/70">
                            <img src="https://picsum.photos/id/325/600/300" alt="医学影像分析模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">医学影像分析</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">CT影像病变检测系统，辅助医生进行疾病诊断和分析。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-secondary/10 text-secondary rounded-full">语义分割</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板4 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-warning to-warning/70">
                            <img src="https://picsum.photos/id/429/600/300" alt="农作物病虫害检测模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">农作物病虫害检测</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">基于图像的农作物病虫害智能检测与诊断系统。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">图像分类</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板5 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-danger to-danger/70">
                            <img src="https://picsum.photos/id/26/600/300" alt="文本检测模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">场景文本检测</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">自然场景中的文本检测与识别系统，支持多语言文本提取。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-primary/10 text-primary rounded-full">目标检测</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板6 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-purple-500 to-purple-400">
                            <img src="https://picsum.photos/id/60/600/300" alt="商品识别模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">商品识别</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">超市商品快速识别与分类系统，适用于智能零售场景。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">图像分类</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板7 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-indigo-500 to-indigo-400">
                            <img src="https://picsum.photos/id/129/600/300" alt="道路分割模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">道路场景分割</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">自动驾驶场景中的道路、车道线、障碍物语义分割系统。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-secondary/10 text-secondary rounded-full">语义分割</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 模板8 -->
                    <div class="bg-white rounded-xl shadow-card overflow-hidden template-card-hover">
                        <div class="h-32 bg-gradient-to-r from-pink-500 to-pink-400">
                            <img src="https://picsum.photos/id/201/600/300" alt="情感分析模板" class="w-full h-full object-cover mix-blend-overlay opacity-60">
                        </div>
                        <div class="p-4">
                            <h4 class="font-medium text-base mb-1">情绪识别</h4>
                            <p class="text-dark-2 text-xs mb-3 line-clamp-2">基于面部表情的情绪识别系统，支持多种基本情绪分析。</p>
                            <div class="flex items-center justify-between">
                                <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">图像分类</span>
                                <button class="bg-primary text-white px-2 py-1 rounded-lg text-xs hover:bg-primary/90 transition-all-300 flex items-center">
                                    <i class="fa fa-clone mr-1 text-xs"></i> 使用
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 分页控件 -->
            <div class="mt-8 flex justify-center">
                <div class="flex items-center space-x-1">
                    <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-light-2 bg-white text-dark-2 hover:border-primary hover:text-primary transition-all-300 disabled:opacity-50 disabled:hover:border-light-2 disabled:hover:text-dark-2" disabled>
                        <i class="fa fa-angle-left"></i>
                    </button>
                    <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-primary bg-primary text-white">1</button>
                    <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-light-2 bg-white text-dark-2 hover:border-primary hover:text-primary transition-all-300">2</button>
                    <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-light-2 bg-white text-dark-2 hover:border-primary hover:text-primary transition-all-300">3</button>
                    <span class="w-9 h-9 flex items-center justify-center text-dark-2">...</span>
                    <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-light-2 bg-white text-dark-2 hover:border-primary hover:text-primary transition-all-300">8</button>
                    <button class="w-9 h-9 flex items-center justify-center rounded-lg border border-light-2 bg-white text-dark-2 hover:border-primary hover:text-primary transition-all-300">
                        <i class="fa fa-angle-right"></i>
                    </button>
                </div>
            </div>
        </main>
    </div>
    
    <!-- 角色切换功能 -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const roleSelector = document.getElementById('role-selector');
            
            // 初始化页面元素显示
            updateRoleVisibility(roleSelector.value);
            
            // 角色切换事件
            roleSelector.addEventListener('change', function() {
                updateRoleVisibility(this.value);
            });
            
            // 更新角色相关元素的显示
            function updateRoleVisibility(role) {
                // 隐藏所有角色相关元素
                document.querySelectorAll('.team-admin, .sys-admin').forEach(el => {
                    el.classList.add('hidden');
                });
                
                // 显示对应角色的元素
                if (role === 'team-admin') {
                    document.querySelectorAll('.team-admin').forEach(el => {
                        el.classList.remove('hidden');
                    });
                } else if (role === 'sys-admin') {
                    document.querySelectorAll('.team-admin, .sys-admin').forEach(el => {
                        el.classList.remove('hidden');
                    });
                }
            }
        });
    </script>
    
    <!-- 侧边栏切换 -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const sidebarToggle = document.getElementById('sidebar-toggle');
            const sidebar = document.getElementById('sidebar');
            
            sidebarToggle.addEventListener('click', function() {
                sidebar.classList.toggle('hidden');
                sidebar.classList.toggle('absolute');
                sidebar.classList.toggle('inset-y-0');
                sidebar.classList.toggle('left-0');
                sidebar.classList.toggle('z-50');
            });
        });
    </script>
</body>
</html>